export default function WatchFun({watchFunChange1,info}){



   // 将时间格式化
   function handleTime (time){    
    var datetime = new Date(time);
    var year = datetime.getFullYear();
    var month = datetime.getMonth() + 1;
    var date = datetime.getDate();
    var hour = datetime.getHours();
    if(hour<=9){
        hour="0"+hour;
    }
    var minute = datetime.getMinutes();
     if(minute<=9){
        minute="0"+minute;
    }
    var second = datetime.getSeconds();
     if(second<=9){
        second="0"+second;
    }
   // var mseconds = datetime.getMilliseconds();
    return year + "-" + month + "-" + date+" "+hour+":"+minute+":"+second;//+"."+mseconds;
};

    return (
        <div className="watchfun">
            <div className="con">
               <h2>
                   查看纪要
               </h2>
               <div>
                   <p>
                       时间:    {handleTime(info.note_updata_time)}
                   </p>
                   <p>
                       内容：{info.note_content}
                   </p>
                   <p>
                       完成状态:   {info.note_done?"完成":"未完成"}
                   </p>
               </div>
               <button onClick={()=>{watchFunChange1()}}>关闭</button>
            </div>
        </div>
    )
}